from django.db import models

class video(models.Model):
    tag = models.CharField(maxlength=200)
    des = models.CharField(maxlength=200)
    class Admin:
        pass

class Image(models.Model):
    name = models.CharField(maxlength=50)
    des = models.CharField(maxlength=300)
    path = models.CharField(maxlength=25)
    tag = models.CharField(maxlength=100)
    class Admin:
        list_display = ('path', 'name', 'des', 'tag')
        fields = (
            ('Name', {'fields': ('name',)}),
            ('Description', {'fields': ('des',)}),
            ('Path', {'fields': ('path',)}),
            ('Tag', {'fields': ('tag',)}),
        )
    def __str__(self):
        return self.name+' '+self.des+' '+self.path+' '+self.tag
            
    
class Taichuang(models.Model):
    path = models.CharField(maxlength=25)
    class Admin:
        pass
    def __str__(self):
        return self.path

class Taipei(models.Model):
    path = models.CharField(maxlength=25)
    class Admin:
        pass
    def __str__(self):
        return self.path

class Mobile(models.Model):
    path = models.CharField(maxlength=25)
    class Admin:
        pass
    def __str__(self):
        return self.path

class PlayGround(models.Model):
    path = models.CharField(maxlength=25)
    class Admin:
        pass
    def __str__(self):
        return self.path

class Six(models.Model):
    path = models.CharField(maxlength=25)
    class Admin:
        pass
    def __str__(self):
        return self.path

class Seven(models.Model):
    path = models.CharField(maxlength=25)
    class Admin:
        fields = (
        (None, {'fields': ('path',)}),
    )

    def __str__(self):
        return self.path

class Story(models.Model):
    title = models.CharField(maxlength=30)
    des = models.CharField(maxlength=300)
    tag = models.CharField(maxlength=100)
    list = models.CharField(maxlength=300)
    time=models.DateTimeField()
    subtitle = models.CharField(maxlength=2000)
    
    class Admin:
        list_display = ('title','des','tag')
        fields = (
            ('title', {'fields': ('title',)}),
            ('des', {'fields': ('des',)}),
            ('tag', {'fields': ('tag',)}),
            ('list', {'fields': ('list',)}),
            ('time', {'fields':('time',)}),
            ('subtitle', {'fields':('subtitle',)}),
        )
    def __str__(self):
        return self.title
        
class tagList(models.Model):
    tag = models.CharField(maxlength=30)
    class Admin:
        list_display = ('tag',)
        fields = (
            ('tag', {'fields':('tag',)}),
        )
    def __str__(self):
        return self.tag
    